﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace ConsoleApplication7
{
    class HistoryConfig
    {
        public static Dictionary<string, string> GetHistory()
        {
            Dictionary<string, string> list = new Dictionary<string, string>();
            list.Add("360se", ConfigurationManager.AppSettings["360se"].ToString());
            list.Add("google", ConfigurationManager.AppSettings["google"].ToString());
            list.Add("firefox", getPath(ConfigurationManager.AppSettings["firefox"].ToString()));
            return list;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public static String getSysPath()
        {
            return System.AppDomain.CurrentDomain.BaseDirectory;
        }
        static String getPath(string path)
        {

            string[] sp = System.IO.Directory.GetDirectories(path);
                if (sp == null && sp.Length == 0)
                {
                    return path;
                }
                return sp[0];
             
        }

    }
}
